package org.example.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQReplyListener;
import org.springframework.stereotype.Component;

/**
 * @author c3886
 */
@Slf4j
@Component
@RocketMQMessageListener(
        topic = "${rocketmq.topic.rpc}",
        consumerGroup = "${rocketmq.consumer.group.rpc}")
public class RpcMessageListener implements RocketMQReplyListener<String, String> {
    @Override
    public String onMessage(String message) {
        log.info("rpc listener receive：" + message);
        return "reply string";
    }
}
